

#change the following to the folder where you install galite
GAHOMEDIR=/home/nordin/demo/

CC=/usr/lib64/openmpi/1.4-gcc/bin/mpic++
CFLAGS= -c -O3 -openmp -I$(GAHOMEDIR) -DUSE_MPI
GSL_DIR=/opt/gsl-1.15

LDFLAGS= -L/opt/openmpi/lib -Wl,-rpath=/opt/openmpi/lib -L$(GAHOMEDIR)/galite -liomp5 -lga -lpthread -lirc -L$(GSL_DIR)/.libs/ -lgsl -lgslcblas -Wl,-rpath=/share/apps/composer_xe_2011_sp1.9.293/compiler/lib/intel64/ -Wl,-rpath=$(GSL_DIR)/.libs/ -Wl,-rpath=$(GSL_DIR)/cblas/.libs/ -limf -lm

SOURCES=ArrayGenome.cpp  Main.cpp  SimpleGA.cpp
OBJECTS=$(SOURCES:.cpp=.o) 
EXECUTABLE=ga



all: $(SOURCES) $(EXECUTABLE)
	
$(EXECUTABLE): $(OBJECTS) 
	$(CC)  $(OBJECTS) -o $@ $(LDFLAGS) 

ArrayGenome.o: ArrayGenome.h
SimpleGA.o: SimpleGA.h
Main.o: ArrayGenome.h SimpleGA.h

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@

clean:
	rm -f $(OBJECTS) $(EXECUTABLE)


